
* Replication commands for "Engineering popular support for long-ruling parties: the role of clientelism" 

* Commands for producing Table 1: use factor analysis to identify the latent dimension "club goods".

* reader: please open the data file "Afrobarometer_R6.dta"

factor HealServ EducNeed WaterProv EnoughEat MainRoad ElecProv, pcf

rotate

predict factor1

* factor 1 is the the proxy for the latent variable "club goods".


* Commands for producing Table 2: Predicting the recipients of clientelist goods

* reader: please open the data file "Afrobarometer_R3.dta"
 
***Column 1 
 
logit VoteBuyDi LivCon EvaEcon age age2 educ gender AssWeal job urban electri ethndis YearsInPower Y2006 i.country, vce(robust)

* reader: please open the data file "Afrobarometer_R6.dta"

***Column 2

reg Club_good LivCon EvaEcon age age2 educ gender AssWeal job urban electri YearsInPower Y2015 i.country, vce(robust)

***Column 3

logit GovEmp LivCon EvaEcon age age2 educ gender AssWeal job urban electri ethndis YearsInPower Y2015 i.country, vce(robust)


* Commands for producing Table 3: Predicting intended vote choice

* reader: please open the data file "Afrobarometer_R3.dta"

***Column 1 

logit VRP LivCon EvaEcon age age2 educ gender AssWeal job urban electri ethndis i.VoteBuyDi##c.YearsInPower Y2006 i.country, vce(robust)

* reader: please open the data file "Afrobarometer_R6.dta"

***Column 2

logit VRP LivCon EvaEcon age age2 educ gender AssWeal job urban electri c.Club_good##c.YearsInPower Y2015 i.country, vce(robust)

***Column 3

logit VRP LivCon EvaEcon age age2 educ gender AssWeal job urban electri ethndis i.GovEmp##c.YearsInPower Y2015 i.country, vce(robust)


* Robustness checks 1: using alternative measures of the DV. AppOne represents approval of one-party rule. TruRul represents trust in the ruling party. Model specifications are identical to the models in Table 3. Only the dependent variables are different.

* reader: please open the data file "Afrobarometer_R3.dta"

ologit AppOne LivCon EvaEcon age age2 educ gender AssWeal job urban electri ethndis i.VoteBuyDi##c.YearsInPower Y2006  i.country, vce(robust)

ologit TruRul LivCon EvaEcon age age2 educ gender AssWeal job urban electri ethndis i.VoteBuyDi##c.YearsInPower Y2006 i.country, vce(robust)

* reader: please open the data file "Afrobarometer_R6.dta"

ologit AppOne LivCon EvaEcon age age2 educ gender AssWeal job urban electri c.Club_good##c.YearsInPower Y2015 i.country, vce(robust)

ologit TruRul LivCon EvaEcon age age2 educ gender AssWeal job urban electri c.Club_good##c.YearsInPower Y2015 i.country, vce(robust)

ologit AppOne LivCon EvaEcon age age2 educ gender AssWeal job urban electri ethndis i.GovEmp##c.YearsInPower Y2015 i.country, vce(robust)

ologit TruRul LivCon EvaEcon age age2 educ gender AssWeal job urban electri ethndis i.GovEmp##c.YearsInPower Y2015 i.country, vce(robust)



* Robustness check 2: examining whether rural-urban gap in support for the ruling party widens as party duration increases. This is done by adding an interaction term between urban residential status and party duration.

* reader: please open the data file "Afrobarometer_R3.dta"

logit VRP LivCon EvaEcon age age2 educ gender AssWeal job electri VoteBuyDi i.urban##c.YearsInPower Y2006  i.country, vce(robust)

* reader: please open the data file "Afrobarometer_R6.dta"

logit VRP LivCon EvaEcon age age2 educ gender AssWeal job electri GovEmp Club_good i.urban##c.YearsInPower Y2015 i.country, vce(robust)



* Robustness check 3: examining whether the importance of clientelism  no longer increases with party duration after the 10-year and 20-year threshold. 

* reader: please open the data file "Afrobarometer_R6.dta"

logit VRP LivCon EvaEcon age age2 educ gender AssWeal job urban electri c.Club_good##i.ten_plus Y2015 i.country, vce(robust)

logit VRP LivCon EvaEcon age age2 educ gender AssWeal job urban electri ethndis i.GovEmp##i.ten_plus Y2015 i.country, vce(robust)

logit VRP LivCon EvaEcon age age2 educ gender AssWeal job urban electri c.Club_good##i.twenty_plus Y2015 i.country, vce(robust)

logit VRP LivCon EvaEcon age age2 educ gender AssWeal job urban electri ethndis i.GovEmp##.twenty_plus Y2015 i.country, vce(robust)



* Robustness check 4 Jackknife analysis, first regarding the effects of club goods

* reader: please open the data file "Afrobarometer_R6.dta"

eststo clear

global xlist LivCon EvaEcon age age2 educ gender AssWeal job urban electri c.Club_good##c.YearsInPower Y2015 i.country

eststo: quietly logit VRP $xlist if country!=1, vce(robust)

estimates store no_Algeria 

eststo: quietly logit VRP $xlist if country!=2, vce(robust)

estimates store no_Benin

eststo: quietly logit VRP $xlist if country!=3, vce(robust)

estimates store no_Botswana 

eststo: quietly logit VRP $xlist if country!=4, vce(robust)

estimates store no_Burkina_Faso 

eststo: quietly logit VRP $xlist if country!=5, vce(robust)

estimates store no_Burundi

eststo: quietly logit VRP $xlist if country!=6, vce(robust)

estimates store no_Cameroon

eststo: quietly logit VRP $xlist if country!=7, vce(robust)

estimates store no_Cape_Verde

eststo: quietly logit VRP $xlist if country!=8, vce(robust)

estimates store no_Cote_dIvoire

eststo: quietly logit VRP $xlist if country!=10, vce(robust)

estimates store no_Gabon

eststo: quietly logit VRP $xlist if country!=11, vce(robust)

estimates store no_Ghana

eststo: quietly logit VRP $xlist if country!=12, vce(robust)

estimates store no_Guinea

eststo: quietly logit VRP $xlist if country!=13, vce(robust)

estimates store no_Kenya

eststo: quietly logit VRP $xlist if country!=14, vce(robust)

estimates store no_Lesotho

eststo: quietly logit VRP $xlist if country!=15, vce(robust)

estimates store no_Liberia

eststo: quietly logit VRP $xlist if country!=16, vce(robust)

estimates store no_Madagascar

eststo: quietly logit VRP $xlist if country!=17, vce(robust)

estimates store no_Malawi 

eststo: quietly logit VRP $xlist if country!=18, vce(robust)

estimates store no_Mali  

eststo: quietly logit VRP $xlist if country!=19, vce(robust)

estimates store no_Mauritius

eststo: quietly logit VRP $xlist if country!=20, vce(robust)

estimates store no_Morocco

eststo: quietly logit VRP $xlist if country!=21, vce(robust)

estimates store no_Mozambique

eststo: quietly logit VRP $xlist if country!=22, vce(robust)

estimates store no_Namibia

eststo: quietly logit VRP $xlist if country!=23, vce(robust)

estimates store no_Niger

eststo: quietly logit VRP $xlist if country!=24, vce(robust)

estimates store no_Nigeria

eststo: quietly logit VRP $xlist if country!=25, vce(robust)

estimates store no_Sao_Tome

eststo: quietly logit VRP $xlist if country!=26, vce(robust)

estimates store no_Senegal 

eststo: quietly logit VRP $xlist if country!=27, vce(robust)

estimates store no_Sierra_Leone 

eststo: quietly logit VRP $xlist if country!=28, vce(robust)

estimates store no_South_Africa 

eststo: quietly logit VRP $xlist if country!=29, vce(robust)

estimates store no_Sudan 

eststo: quietly logit VRP $xlist if country!=32, vce(robust)

estimates store no_Togo

eststo: quietly logit VRP $xlist if country!=33, vce(robust)

estimates store no_Tunisia

eststo: quietly logit VRP $xlist if country!=34, vce(robust)

estimates store no_Uganda 

eststo: quietly logit VRP $xlist if country!=35, vce(robust)

estimates store no_Zambia

eststo: quietly logit VRP $xlist if country!=36, vce(robust)

estimates store no_Zimbabwe

* producing the coefficient plot for the first Jackknife analysis

coefplot no_Algeria no_Benin no_Botswana  no_Burkina_Faso no_Burundi  no_Cameroon no_Cape_Verde no_Cape_Verde no_Gabon no_Ghana no_Guinea no_Kenya no_Kenya  no_Liberia  no_Madagascar no_Malawi no_Mali ///
 no_Mauritius no_Morocco  no_Mozambique  no_Namibia no_Niger  no_Nigeria no_Sao_Tome no_Senegal  no_Sierra_Leone  no_South_Africa   ///
 no_Sudan   no_Togo  no_Tunisia no_Uganda   no_Zambia  no_Zimbabwe, yline(0) vertical keep(c.Club_good#c.YearsInPower)


* Robustness check 4 Jackknife analysis, second regarding the effects of patronage

* reader: please open the data file "Afrobarometer_R6.dta"


eststo clear

global xlist2 LivCon EvaEcon age age2 educ gender AssWeal job urban electri i.GovEmp##c.YearsInPower Y2015 i.country

eststo: quietly logit VRP $xlist2 if country!=1, vce(robust)

estimates store no_Algeria 

eststo: quietly logit VRP $xlist2 if country!=2, vce(robust)

estimates store no_Benin

eststo: quietly logit VRP $xlist2 if country!=3, vce(robust)

estimates store no_Botswana 

eststo: quietly logit VRP $xlist2 if country!=4, vce(robust)

estimates store no_Burkina_Faso 

eststo: quietly logit VRP $xlist2 if country!=5, vce(robust)

estimates store no_Burundi

eststo: quietly logit VRP $xlist2 if country!=6, vce(robust)

estimates store no_Cameroon

eststo: quietly logit VRP $xlist2 if country!=7, vce(robust)

estimates store no_Cape_Verde

eststo: quietly logit VRP $xlist2 if country!=8, vce(robust)

estimates store no_Cote_dIvoire

eststo: quietly logit VRP $xlist2 if country!=10, vce(robust)

estimates store no_Gabon

eststo: quietly logit VRP $xlist2 if country!=11, vce(robust)

estimates store no_Ghana

eststo: quietly logit VRP $xlist2 if country!=12, vce(robust)

estimates store no_Guinea

eststo: quietly logit VRP $xlist2 if country!=13, vce(robust)

estimates store no_Kenya

eststo: quietly logit VRP $xlist2 if country!=14, vce(robust)

estimates store no_Lesotho

eststo: quietly logit VRP $xlist2 if country!=15, vce(robust)

estimates store no_Liberia

eststo: quietly logit VRP $xlist2 if country!=16, vce(robust)

estimates store no_Madagascar

eststo: quietly logit VRP $xlist2 if country!=17, vce(robust)

estimates store no_Malawi 

eststo: quietly logit VRP $xlist2 if country!=18, vce(robust)

estimates store no_Mali  

eststo: quietly logit VRP $xlist2 if country!=19, vce(robust)

estimates store no_Mauritius

eststo: quietly logit VRP $xlist2 if country!=20, vce(robust)

estimates store no_Morocco

eststo: quietly logit VRP $xlist2 if country!=21, vce(robust)

estimates store no_Mozambique

eststo: quietly logit VRP $xlist2 if country!=22, vce(robust)

estimates store no_Namibia

eststo: quietly logit VRP $xlist2 if country!=23, vce(robust)

estimates store no_Niger

eststo: quietly logit VRP $xlist2 if country!=24, vce(robust)

estimates store no_Nigeria

eststo: quietly logit VRP $xlist2 if country!=25, vce(robust)

estimates store no_Sao_Tome

eststo: quietly logit VRP $xlist2 if country!=26, vce(robust)

estimates store no_Senegal 

eststo: quietly logit VRP $xlist2 if country!=27, vce(robust)

estimates store no_Sierra_Leone 

eststo: quietly logit VRP $xlist2 if country!=28, vce(robust)

estimates store no_South_Africa 

eststo: quietly logit VRP $xlist2 if country!=29, vce(robust)

estimates store no_Sudan 

eststo: quietly logit VRP $xlist2 if country!=32, vce(robust)

estimates store no_Togo

eststo: quietly logit VRP $xlist2 if country!=33, vce(robust)

estimates store no_Tunisia

eststo: quietly logit VRP $xlist2 if country!=34, vce(robust)

estimates store no_Uganda 

eststo: quietly logit VRP $xlist2 if country!=35, vce(robust)

estimates store no_Zambia

eststo: quietly logit VRP $xlist2 if country!=36, vce(robust)

estimates store no_Zimbabwe

* producing the coefficient plot for the second Jackknife analysis

coefplot no_Algeria no_Benin no_Botswana  no_Burkina_Faso no_Burundi  no_Cameroon no_Cape_Verde no_Cape_Verde no_Gabon no_Ghana no_Guinea no_Kenya no_Kenya  no_Liberia  no_Madagascar no_Malawi no_Mali ///
 no_Mauritius no_Morocco  no_Mozambique  no_Namibia no_Niger  no_Nigeria no_Sao_Tome no_Senegal  no_Sierra_Leone  no_South_Africa   ///
 no_Sudan   no_Togo  no_Tunisia no_Uganda   no_Zambia  no_Zimbabwe, yline(0) vertical keep(GovEmp#YearsInPower)



* Robustness check 5 use multi-level random effect models instead of fixed effect models

* reader: please open the data file "Afrobarometer_R3.dta"

xtmelogit VRP LivCon EvaEcon age age2 educ gender AssWeal job urban electri ethndis i.VoteBuyDi##c.YearsInPower Y2006 || country: VoteBuyDi

* reader: please open the data file "Afrobarometer_R6.dta"

xtmelogit VRP LivCon EvaEcon age age2 educ gender AssWeal job urban electri c.Club_good##c.YearsInPower Y2015 || country: Club_good

xtmelogit VRP LivCon EvaEcon age age2 educ gender AssWeal job urban electri ethndis i.GovEmp##c.YearsInPower Y2015 || country: GovEmp

